When an analog data value is input to a PLC, an A/D conversion unit (an A/D conversion device) is used to convert the analog data value to a digital value. Generally, the A/D conversion sampling cycle of the A/D conversion unit that converts an input analog data value to a digital value is asynchronous with a control cycle (a scan time) of a CPU (Central Processing Unit) unit that controls the entire PLC system; and, in many cases, the sampling cycle is faster than the control cycle. Therefore, when A/D conversion values are logged, it is difficult to log all the A/D conversion values by the CPU unit without missing some of them.
There is a method of performing a logging process in the A/D conversion unit that logs all the A/D conversion values without missing any part thereof. However, in order to refer to the collected data, the relevant data needs to be read out into the CPU unit after the logging has been completed. Conventionally, a dedicated communication process needs to be performed many times during the reading process, and thus there is a problem in that the process takes a long time.
In order to solve this problem, a technique, which does not requiring dedicated processing and in which A/D conversion values are stored in a shared memory that is an area accessible from a CPU unit all the time, has been proposed (see, for example, Patent Literature 1). Furthermore, a continuous data collection method that uses a technique for collecting data in a ring buffer format has been provided (see, for example, Patent Literature 2). Further, a technique for collecting data in a shared memory on a ring buffer format has been also proposed (see, for example, Patent Literature 3).
Furthermore, a technique for collecting and referring to continuous data; a technique for handling collected data in chronological order; and a technique for logging A/D conversion values that are updated in a faster A/D conversion cycle (a sampling cycle) have been proposed (see, for example, Patent Literature 4). Specifically, acquisition of continuous logging data is made possible by a CPU unit that monitors a specific shared memory and extracts logging data stored in a finite internal memory of an A/D conversion unit on a ring buffer configuration into an internal register of the CPU unit before the logging data is overwritten.